package com.slm.mylibrary.view;

import android.app.Dialog;
import android.content.Context;
import android.view.Gravity;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager;

import androidx.annotation.NonNull;

import com.slm.mylibrary.R;

/**
 * @ProjectName: My Application
 * @Package: com.slm.mylibrary.view
 * @ClassName: WaitDialog
 * @Description: java类作用描述
 * @Author: 王丹丹
 * @CreateDate: 2020/5/30 22:55
 * @UpdateUser: 更新者
 * @UpdateDate: 2020/5/30 22:55
 * @UpdateRemark: 更新说明
 * @Version: 1.0
 */
public class WaitDialog extends Dialog {

    public WaitDialog(@NonNull Context context) {
        super(context, R.style.base_http_dialog);
        setContentView(R.layout.base_http_dialog);

        Window window = this.getWindow();
        window.setGravity(Gravity.CENTER);

        WindowManager.LayoutParams lp = window.getAttributes();
        lp.width = ViewGroup.LayoutParams.WRAP_CONTENT;
        lp.height = ViewGroup.LayoutParams.WRAP_CONTENT;
        onWindowAttributesChanged(lp);
    }


}
